package com.adkfp.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.adkfp.bean.ADKPowerGroupBean;
import com.adkfp.dao.ADKPowerGroupDaoMapper;
import com.adkfp.service.IADKPowerGroupService;

/**
 * class name:ADKPowerGroupService实现类 <BR>
 * class description: ADKPowerGroup表的增删改查 <BR>
 * Remark: <BR>
 * @version 1.00 2019年01月03日
 * @author JACK)jackwei
 */
@Service("aDKPowerGroupService")
public class ADKPowerGroupServiceImpl implements IADKPowerGroupService {
	@Resource
	private ADKPowerGroupDaoMapper aDKPowerGroupMapper;

	/**
	 * @Override
	 * Method name: insert <BR>
	 * Description: 插入一条记录 <BR>
	 * Remark: <BR>
	 * @param bean  <BR>
	*/
	@Override
	@Transactional
	public void insert(ADKPowerGroupBean bean) {
		aDKPowerGroupMapper.insert(bean);
	}

	/**
	 * @Override
	 * Method name: delete <BR>
	 * Description: 删除一条记录 <BR>
	 * Remark: <BR>
	 * @param id  <BR>
	*/
	@Override
	@Transactional
	public void delete(Integer id) {
		aDKPowerGroupMapper.delete(id);
	}

	/**
	 * @Override
	 * Method name: update <BR>
	 * Description: 更新一条记录 <BR>
	 * Remark: <BR>
	 * @param bean  <BR>
	*/
	@Override
	@Transactional
	public void update(ADKPowerGroupBean bean) {
		aDKPowerGroupMapper.update(bean);
	}

	/**
	 * @Override
	 * Method name: findById <BR>
	 * Description: 根据id获取一条记录 <BR>
	 * Remark: <BR>
	 * @param id
	 * @return  <BR>
	*/
	@Override
	public ADKPowerGroupBean findById(Integer id) {
		return aDKPowerGroupMapper.findById(id);
	}

	/**
	 * @Override
	 * Method name: findByCondition <BR>
	 * Description: 根据bean里面的条件(判空)查询所有记录 <BR>
	 * Remark: <BR>
	 * @param bean
	 * @return  <BR>
	*/
	@Override
	@Transactional
	public List<ADKPowerGroupBean> findByCondition(ADKPowerGroupBean bean) {
		return aDKPowerGroupMapper.findByCondition(bean);
	}

	/**
	 * @Override
	 * Method name: findByConditionCount <BR>
	 * Description: 根据bean里面的条件(判空)查询所有记录条数 <BR>
	 * Remark: <BR>
	 * @param bean
	 * @return  <BR>
	*/
	@Override
	@Transactional
	public long findByConditionCount(ADKPowerGroupBean bean) {
		return aDKPowerGroupMapper.findByConditionCount(bean);
	}
}